package homework.test02;

import java.sql.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.function.BiConsumer;

public class demo01 {
    public static void main(String[] args) {

        HashMap<Integer, Student> map1 = new HashMap<>();
        map1.put(1001, new Student(1001, "李飞", 60));
        map1.put(1002, new Student(1002, "王飞", 99));
        map1.put(1003, new Student(1003, "小宋", 33));

        HashMap<Integer, Student> map2 = new HashMap<>();
        map2.put(2001, new Student(2001, "张三", 62));
        map2.put(2002, new Student(2002, "李四", 55));
        map2.put(2003, new Student(2003, "王五", 66));

        ArrayList<HashMap<Integer,Student>> list = new ArrayList<>();
        list.add(map1);
        list.add(map2);

        for (HashMap<Integer, Student> i : list) {
            i.forEach((integer, student) -> System.out.println(integer + ":" + student));
        }

    }
}
